home *** CD-ROM | disk | FTP | other *** search
/ MACD 5 / MACD 5.bin / workbench / time / docmd / docmd.doc < prev    next >
Encoding:
Text File  |  1993-02-28  |  4.5 KB  |  111 lines

  1.  
  2. docmd/docmd                                                     docmd/docmd
  3.  
  4.                 DOCMD.DOC
  5.  
  6.              TIMED COMMAND EXECUTION
  7.  
  8.                 Tobias Ferber
  9.                 Goethestraße 32
  10.                 76135 Karlsruhe
  11.                 Deutschland
  12.  
  13.                 ukjg@ibm3090.rz.uni-karlsruhe.de
  14.  
  15.  
  16.     DOCMD [command] [options]
  17.  
  18.     DOCMD is a utility for timed execution of a command.  I wrote it mainly
  19.     to update the datestamp of a file in my s: directory regularly because
  20.     my good old A1000 has no 'battery backed up clock'.
  21.     The datestamp of this file can be copied to the system clock using the
  22.     GetDate command coming with this distribution of DOCMD.  You may of
  23.     course use DOCMD to execute any command you like.
  24.  
  25.     DOCMD is in the PUBLIC DOMAIN.  I claim no copyright at all. That means
  26.     you can do with it whatever you want -- you may even sell it (if you can
  27.     find anyone who would like to pay for it :)
  28.     However donations in any form are not rejected -- preferably post
  29.     cards with a photo of YOUr home-town and the name of the program
  30.     i.e. DOCMD in this case.
  31.  
  32.                 OPTIONS
  33.  
  34.     DOCMD supports both AmigaDOS and UNIX style options (with a leading
  35.     minus sign '-').  Options may occur anywhere on the command line but
  36.     they *MUST* occur singly.  I.e.  -a -b instead of -ab.  Options
  37.     requiring an additional numeric value or string may occur with or
  38.     without an intervening space.  -n17 and -n 17 are both legal.  Last
  39.     applies to the UNIX style options only; AmigaDOS keywords MUST be
  40.     seperated with one or more spaces from their value. The usage of an
  41.     equals sign '=' instead of a space character is legal for icon
  42.     ToolTypes only .  All options must of course be seperated with one
  43.     or more spaces.
  44.  
  45.     DOCMD options are NOT case-sensitive except for the ToolTypes entries
  46.     which are due to the FindToolType() function in the icon.library.
  47.     This may change in future revisions of this library.  ToolType keywords
  48.     are the same as the AmigaDOS keywords.  The SHOW keyword is not allowed
  49.     as a ToolType.
  50.  
  51.     Here is a short overview of legal options:
  52.  
  53.       CMD/K,NOW/S,EVERY/N,COUNT/N,PRIORITY/N,WBSCREEN/T,QUIT/S:
  54.  
  55.       CMD        or '-c'  force next argument to be the command
  56.       NOW        or '-f'  don't wait before first execution
  57.       EVERY      or '-t'  execute command every <n> seconds
  58.       COUNT      or '-n'  break after <n> executions
  59.       PRIORITY   or '-p'  set task priority for the executed command
  60.       WBSCREEN   or '-w'  show Workbench Screen during execution
  61.       QUIT       or '-q'  remove DOCMD handler
  62.  
  63.     You can get this list by simply starting DOCMD with a '?' as argument.
  64.     The trailing /K /N /S ot /T in AmigaDOS options must not be typed in
  65.     the command-line. They only indicate the type of argument.  e.g. /N
  66.     indicates the need of a [N]umerical argument to a keyword.
  67.  
  68.     -c <cmd>    forces the next argument to be the timed command.
  69.         This command will be executed by DOCMD every <n> seconds
  70.         if <n> is the number you specified with the -t option.
  71.         You do not need to type '-c' if your command differs from
  72.         all option names.
  73.  
  74.         Note: You'll have to quote this command if there are
  75.         space characters in it as in "date >s:datestamp".
  76.  
  77.     -t <secs>    set the number of seconds of delay between two executions
  78.         of the command you gave using the '-c' option. DOCMD will
  79.         also wait <secs> seconds before executing your command for
  80.         the first time if you do not say "NOW" or '-f' in the
  81.         command-line.  You also have to pass "NOW" or '-f' if you
  82.         want the new delay time to come into effect immediately.
  83.         Otherwise it will change after the previously set delaytime
  84.         runs out.
  85.  
  86.         Note: If you set <secs> to 0 you'll get the default of 60
  87.         seconds.  You don't need DOCMD to execute sth. without a
  88.         delay.
  89.  
  90.     -f        foce execution now.  This option allows you to force the
  91.         immediate execution of a command by the handler.  If you
  92.         pass this option when installing a new handler it will not
  93.         wait <secs> seconds until your command is executed for
  94.         the first time.  If you send a '-f' to a waiting handler
  95.         it will execute the command immediately.
  96.  
  97.     -n <count>    set the number of executions before the handler will be
  98.         removed.  This is useful it you want to wait until a
  99.         command is executed <count> times.
  100.  
  101.     -p <pri>    set task priority to execute your command. (default 0)
  102.  
  103.     -w        force the Workbench Screen to be in front each time
  104.         the command is executed.
  105.  
  106.     -q        remove a DOCMD handler.
  107.  
  108.     That's all.  Have fun
  109.  
  110.                                   -Tobi
  111.